<?php
session_start();
//ct 2009-01-29 Added class _subpath
// includes
	include_once "quickcrud_connect.php";
	include_once "CFclass/CF_mysql_com.php";
	include_once "CFclass/CF_class_com.php";
	include_once "projects_fields.php";

// define custom class
	class CListSpecial extends CF_AJTable {
		// set the row limit for this class
		//var $default_row_limit = 100;
	var $multiselect = false;
	
	}
// Use class instance
	$tableinstance = new CListSpecial($fieldspec, $testtable);
	$tableinstance->set_name('projects'); // is now redundant
	$tableinstance->set_actionpage("projects_proc.php");
	$tableinstance->set_selfpage("projects_list.php");
	$tableinstance->tablename='projects';
	
	// uncomment and specify for tables with edit page
	$tableinstance->set_editpage("projects_edit.php");

	//$tableinstance->get_filter_vals();
	//$tableinstance->get_pagination();
	
	$qry_list = "SELECT * FROM projects WHERE 1  " . $tableinstance->make_query_filter()  . $tableinstance->make_query_sort() ;
	//print $qry_list;
	
	
	//$array_list = get_array_limitquery($qry_list, $tableinstance->startat, $tableinstance->numrows );
	$array_list = get_array_query($qry_list);
	
	$tableinstance->set_valuesarray($array_list);
	$html_table = $tableinstance->maketable();

	
	?>
	
<html>

<head>
	<title>projects list</title>
	<!-- <link rel="stylesheet" href="CFclass/commonctls.css" type="text/css"> -->
	<link rel="stylesheet" type="text/css" href="table_design.css" />
	<script language="javascript"  type="text/javascript">

	url_syncval = "projects_proc.php";
	keyvariables = 'project_id';
	tablename = 'projects'

		
	</script>
	<script src="ref-yui/yahoo.js"></script>
	<script src="ref-yui/event.js"></script>
	<script src="ref-yui/connection.js"></script>
	<script src="CFclass/ajtable.js"></script>
	<script src="CFclass/CFmultiselect.js"></script>
	</head>

<body onload="statusPrint('')";>
<?php //print $testtable->get_filter_vals();
//print "THIS IS DEBUG STUFF:<BR>\n";
//print_r($testtable->filters);
//print "Session: ";
//print_r($_SESSION);
//print " <br>";
//print "Request: ";
//print_r($_REQUEST);
//print "<br>\nEND DEBUG<br>\n";
 //$testtable->make_query_filter()
 ?>

 <br/>
<?php 
 print $tableinstance->pageform . "<br/>";

//print $tableinstance->make_filters_box();
 ?>
<br/>
<table name='projects' id='projects'>
<thead>
<tr class="title_row">
<?php print $tableinstance->make_sort_heading(); ?>
</tr>
</thead>
<tbody>
<?php print $tableinstance->maketable() ?>
</tbody>
</table>
<br/>
<input type="button" value="Reload Menu" onclick="parent.frame_menu.location.reload()">
<br/>
<?php //print $tableinstance->make_apply_all() ?>
<br/>
<table name='multi_act'>
<?php //print $tableinstance->make_multi_act_row() ?>
</table>
<br/>
<table>
<?php print $tableinstance->make_add_box('new') ?>
</table>

<span name="status_text" id="status_text">
Warning - Low JavaScript Fuctionality.  Please Enable Javascript, or (if it is enabled), use a newer browser
</span>
<span name="debug_text" id="debug_text">
Debug Here
</span>
<hr/>
Simple Table Test</br>
<table>
<?php print $simple_text ?>
</table>
</body>